package com.shrcl.engineerprocess.domain.events;

import com.shrcl.engineerprocess.domain.EngineerProjectAssignment;
import com.shrcl.engineerprocess.domain.events.EngineerProjectAssignmentEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrcl.engineerprocess.domain.events.EngineerProjectAssignmentEventsManager")
public class EngineerProjectAssignmentEventsManager extends EntityEventsManager<EngineerProjectAssignment> {
  @Autowired(required = false)
  private Collection<EngineerProjectAssignmentEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<EngineerProjectAssignmentEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireCheckExecutingTimer(final EngineerProjectAssignment entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerProjectAssignmentEventsListener)listener).checkExecutingTimer(entity);
    }
    
  }
  
  public void fireCancel(final EngineerProjectAssignment entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerProjectAssignmentEventsListener)listener).cancel(entity);
    }
    
  }
  
  public void fireFinish(final EngineerProjectAssignment entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerProjectAssignmentEventsListener)listener).finish(entity);
    }
    
  }
  
  public void fireDoSummary(final EngineerProjectAssignment entity, final String summary) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerProjectAssignmentEventsListener)listener).doSummary(entity,summary);
    }
    
  }
  
  public void fireUpdateV(final EngineerProjectAssignment entity, final Procedure1<? super EngineerProjectAssignment> updater) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerProjectAssignmentEventsListener)listener).updateV(entity,updater);
    }
    
  }
  
  public void fireStartExecute(final EngineerProjectAssignment entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerProjectAssignmentEventsListener)listener).startExecute(entity);
    }
    
  }
}
